#include <iostream>
#include <filesystem>
#include <string>

namespace fs = std::filesystem;

int main() {
    // 创建数据集目录结构
    std::string base_dir = "dataset";
    
    try {
        // 创建主目录
        fs::create_directories(base_dir + "/train");
        
        // 创建数字子目录 (0-9)
        for (int i = 0; i <= 9; ++i) {
            std::string dir_path = base_dir + "/train/" + std::to_string(i);
            fs::create_directories(dir_path);
            std::cout << "Created directory: " << dir_path << std::endl;
        }
        
        // 创建模型目录
        fs::create_directories("models");
        fs::create_directories("config");
        fs::create_directories("resources");
        
        std::cout << "Directory structure created successfully!" << std::endl;
        std::cout << "Please place your training images in dataset/train/0/, dataset/train/1/, etc." << std::endl;
        
    } catch (const fs::filesystem_error& ex) {
        std::cout << "Error creating directories: " << ex.what() << std::endl;
        return -1;
    }
    
    return 0;
}